-- GENERATED SPELL FOR [Primal Ooze] --


function spell0_6557(pUnit, Event) --@Clone,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(14146,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_6557', 1, 1)
end

function spell1_6557(pUnit, Event) --@Slowing Ooze,n/a--
pUnit:FullCastSpellOnTarget(16050,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6557', 10000, 1)
end

function Sorts_6557(pUnit, Event)
local choix_sorts_6557 = math.random(0, 1)
if choix_sorts_6557 == 0 then
pUnit:RegisterEvent('spell0_6557', 1, 1)
end
if choix_sorts_6557 == 1 then
pUnit:RegisterEvent('spell1_6557', 1, 1)
end
end

function mob6557_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6557', math.random(1500, 3000), 1)
end

function mob6557_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6557_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6557_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6557, 1, 'mob6557_Action')
RegisterUnitEvent(6557, 2, 'mob6557_Leave')
RegisterUnitEvent(6557, 3, 'mob6557_Kill')
RegisterUnitEvent(6557, 4, 'mob6557_Die')
